Terrain Following ala Paul Hansen

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


The Elevator program has been tested on
High and Maximum Indigo² Impact systems running IRIX 6.2.
It is always preferable to run it on systems with 4 TRAMS.
WARNING
The TEXTURE_LOD EXTension is not implemented prior to IRIX 6.2.
This application is best run on a system with at least 128 Mb of system memory.

It is NOT expected to run on the following systems:
-- Infinite Reality
-- Reality Engine

The Elevator binary included on v6.1 of the Developer Toolbox was
generated on an IRIX 6.2 Indigo² Impact system.

This directory contains a fake core file to avoid generating large core files.

In order to recompile you must install the GLUT 3.0 software,
included on this v6.1 Toolbox, onto your own system.
The inst images or tardist file can be found in

toolbox/src/exampleCode/opengl/GLUT/inst

    Author : Patrick Bouchaud      &     Paul Hansen
             galaad@neu.sgi.com          hansen@engr.sgi.com

PURPOSE:
========

    A wide range of applications require mapping satellite photographs
(2D texture) onto terrain elevation data (Geometry), and navigating over
the resulting scene in real-time.

    The diverse texture LOD are loaded independently, depending on the 
actual distance to the geometry (see TEXTURE_LOD EXTension)

    Paul Hansen (hansen@engr.sgi.com) integrated the texture tiling, 
and LOD, for this 6,000x6,000 satellite image (courtesy of SAGEM).



AUTHORS's tricks :
==================

    My Makefile first creates a .ofiles directory, where all the .o 
files go, and where the actual executable $(TARGET).EXE is generated.
A $(TARGET) link is then created from the current directory to the 
executable.

    This Makefile currently generates a fake core file without any 
write permission. This is to avoid generating a core file which would 
be over 50Mb, should you run this program on a non IRIX 6.2 IMPACT 
system.

    A more elaborate description of enhancements is provided in the
Fast VisSim On Impact Graphics article included in this directory.

Libraries :
===========

    These Examples use P.Haeberli's libimage.a, and M.Kilgard's 
libglut.a.
    I assume these files are located under /usr/lib, and the image.h 
header can be found under /usr/include/gl, whereas the glut.h file 
should be under /usr/include/GL.



CODE ARCHITECTURE :
===================

The code is made of 2 separate modules :

    The Main module               - Main.c
    The Culling module            - culling.c


1) The Main module :
--------------------


A.  Interface with GLUT to open the main window, and handle associated 
    callbacks.  Read the elevation data.  The resulting geometry data 
    are stored in a "Elevation Terrain[lat][lon]" array

B.  Finally, the main purpose of the Main module is to draw the 
    geometry, using many different technics depending on the current 
    drawing parameters - set by the user-interface.

    The function is supposed to draw a latitude=constant strip, with
    longitudes varying from lonmin to lonmax arguments.


2) The Culling Module :
-----------------------

    The culling algorithm is implemented as follow :

    We first get the vertex coordinates of the current viewing frustum 
pyramid.  We record these coordinates in a geometry structure which is 
hierarchized as follows : vertex data <- edge data <- face data (a face 
is made of N edges, each edge being made of 2 vertice). We want to NOT 
duplicate the vertex coordinates, to make sure rounding errors will 
not make the geometry fall apart.

    Then we clip our viewing pyramid with the scene bounding box, i.e.
considering a facetted volume is defined by a combination of plane 
inequations, we clip our viewing pyramid with each of the half spaces.


THE INITIAL REMAINING STEPS WERE :

    Finally, on the truncated pyramid :
    We get the min and max latitude values
    for all the planes latitude=constant within [latmin, latmax]

        we compute the min and max longitudes of the lat=cst plane 
	intersected with the truncated pyramid

        we call the callback function with (latmin, lonmin, lonmax )
        (in fact we send the maximum limits with the previous strip)

    end for


AFTER INTEGRATION OF THE TILING, and LOD CONTROL :


    We use the same routines (min/max latitude and min/max longitudes)
to iterate along each tile. The drawing of the triangles which cross
tile-boundaries is done using triangle fans, as explained in the 
accompanying showcase file.





Files of interest from "src/tutorials/OGLT/Examples/TerrainFollowing/src.hansen" directory

Source

Documentation

Reference

Subdirectories


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire src.hansen directory.

Copyright © 1996, Silicon Graphics, Inc.